{% extends site.theme|stringformat:"s/include/base.html" %}
{% block title %}SDCms 首页{% endblock %}
{% block script %}
<style type="text/css">
    #editor{width: 900px;}
    #hideEditor{display:none;}
</style>
<script src="/static/dialog/lhgdialog.min.js?self=true" type="text/javascript"></script>
<script src="/static/{{site.theme}}/js/utilitydlg.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8" src="/static/editor/editor_config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/editor/editor_all_min.js"></script>
<link rel="stylesheet" type="text/css" href="/static/editor/themes/default/ueditor.css" />
{% endblock %}
{% block mainer %}
<form action="/{%ifequal articleForm.id -1%}add{%else%}edit{%endifequal%}!Article.do" method="post" view="Article">
	<table class="formTable">
		<tr class="formTr"><td class="formLabel">{{articleForm.title.label}}:</td><td class="formField2">{{articleForm.title}}{{articleForm.title.errors}}</td></tr>
		<tr class="formTr"><td class="formLabel">{{articleForm.catalog.label}}:</td><td class="formField2">{{articleForm.catalog}}{{articleForm.catalog.errors}}<span class="formLabel2">{{articleForm.status.label}}:</span>{{articleForm.status}}{{articleForm.status.errors}}
							<span class="formLabel2">{{articleForm.isComment.label}}:</span>{{articleForm.isComment}}
						   <span class="formLabel2">地址名:</span><span class="formField8">{{articleForm.name}}只能用数字、字母和减号。</span>{{articleForm.name.errors}}</td></tr>
		<tr class="formTr"><td class="formLabel">{{articleForm.contentF.label}}:</td>
			<td class="formField2">
				<div id="editor"></div><script type="text/plain" id="myEditor">{{articleForm.contentF.value|default:''|safe}}</script>
				<script type="text/javascript">
					var option = {initialContent: '',minFrameHeight: 400, UEDITOR_HOME_URL:'/static/editor/', iframeCssUrl:'themes/default/iframe.css', textarea: '{{articleForm.contentF.name}}',
									   toolbars:[['Source','FullScreen','Preview','Undo','Redo','|','FontFamily','FontSize','ForeColor','BackColor','Bold','Italic','Underline','StrikeThrough','|','BlockQuote','PastePlain','|','InsertOrderedList','InsertUnorderedList','|', 'Paragraph','RowSpacing','|','RemoveFormat','FormatMatch','SelectAll','ClearDoc'],
											        ['Indent','Outdent','JustifyLeft','JustifyCenter','JustifyRight','JustifyJustify','|','Link','Unlink','Anchor','HighlightCode','InsertImage','InsertVideo','Map','GMap','InsertFrame', 'PageBreak','Horizontal','|','InsertTable','DeleteTable','InsertParagraphBeforeTable','InsertRow','DeleteRow','InsertCol','DeleteCol','MergeCells','MergeRight','MergeDown','SplittoCells','SplittoRows','SplittoCols','|','SearchReplace','Print','Help']]
										};
					var editor = new baidu.editor.ui.Editor(option);editor.render('myEditor');
				</script>
				{{articleForm.contentF.errors}}
			</td></tr>
		<tr class="formTr"><td class="formLabel">{{articleForm.frontcover.label}}:</td><td class="formField2">{{articleForm.frontcover}}{{articleForm.frontcover.errors}}<a href="javascript:openImgDlg(null, null);">选择图片</a>   <a href="javascript:clearImg(null, null);">清空</a></td></tr>
		<tr class="formTr"><td></td><td class="formBtn"><input id="btnOK" type="submit" value="提交"><input type="reset" value="重置">
									<input name="_id"  id="_id" type="Hidden" value="{{articleForm.id}}">
									</td></tr>
	</table>
</form>
<script type="text/javascript">
<!-- 
bindFrontcover();
//-->
</script>
{% endblock %}